<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
//key为什么类型(字符串,数字)
var obj = {
    username: 'zs',
    'age': 20,
    1: 'abc',
    // [1,2,3]: 'abc' //数组,不可以
    // {}: 'abc'//对象,不可以
    // function(){}: 'abc'//方法不可以
}
// console.log('obj', obj)

// Set对数组增强,value唯一值
// Map对对象增强,key可以为任意值
let map = new Map()
// let a = [1,2,3]
// let a = {}
let a = function(){}
map.set(a, 'abc')//key存地址
console.log(map.get(a))
</script>
</html>